home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2002 January / PC Answers January 2002.7z / PC Answers January 2002.bin / graphics / freepixl / _SETUP.1 / StartWithThis.pxl < prev    next >
Text File  |  2001-09-26  |  53KB  |  1,598 lines

  1. {-----------------------------------------------------------------------
  2.     Filename    : pxltools.pxl
  3.     Purpose    : demo of PiXCL Tools capabilities
  4.     Date        : v5.10 26-Jun-2001
  5.     Author        : S.Dibbs, VYSOR Integration Inc
  6.  
  7.     Modified    : 13 Sep 2001
  8.     Purpose    : change processing since waitInput() 
  9.             : no longer allowed within subroutines
  10.     Version    : FreePiXCL 4.48, PiXCL 5.10
  11. -------------------------------------------------------------------------}
  12. Initialize:
  13. { Get the screen parameters and adjust the main window for a fixed size. }
  14.     UseCoordinates(PIXEL)
  15.     UseCursor(WAIT)    
  16.     NewCaption$ = "PiXCL Tools Demonstration Program"
  17.     UseCaption(NewCaption$) 
  18.     AppWindowHandle(Handle,Handle$, geoPiXCLFlag,PiXCLMajor,Minor)
  19.     UseBackground(TRANSPARENT,0,0,0)
  20.     DrawBackground
  21.     WinShow(NewCaption$,MAXIMIZE, Res) 
  22.     WinShow(NewCaption$,NOTOPMOST, Res) 
  23.     AutoProgressBar(DISABLE)
  24.     GetScreenCaps(HORZRES, X_res) 
  25.     GetScreenCaps(VERTRES, Y_res)
  26.     GetScreenCaps(HORZSIZE, X_size)
  27.     GetScreenCaps(VERTSIZE, Y_size)
  28.     GetScreenCaps(NUMCOLORS,Colours)
  29.     GetScreenCaps(BITSPIXEL,BitsPerPixel)
  30.     GetScreenCaps(PLANES,BitPlanes)
  31.     Pause = 2500 {tailor this number}
  32.  
  33.     If Y_res > 480 Then Goto VGA_OK
  34.         MessageBox(OK,1,STOP,
  35. "This PiXCL Tools demo requires at least 800x600X256 color mode to function. PiXCL Tools itself is display resolution independent. Please either set your PC display to a higher resolution mode or find a newer computer. 1024x768x256 or better is the recommended mode for best display results.",
  36.     "Your PC is set to 640 x 480 VGA mode.",Res)
  37.         End
  38.     {endif}
  39. VGA_OK:
  40.     DrawBackground
  41.     If Y_res = 600
  42.         MessageBox(OK,1,EXCLAMATION,
  43. "Your PC is set to 800x600 mode, and this demo 
  44. will run, however, 1024x768x256 or better is the 
  45. recommended mode for best display results.",
  46.         "Adequate hardware environment",Res)
  47.         SVGA$ = "Y"  
  48.         XGA$ = "N"
  49.         WinLocate(New_Caption$,0,0,799,570,Res)
  50.     Else    
  51.           SVGA$ = "N"
  52.         XGA$ = "Y"
  53.         WinLocate(New_Caption$,0,0,1023,740,Res)
  54.     Endif
  55.  
  56.     DirGet(SourceDir$)
  57.  
  58. {    List of demo files }
  59.     ImageFile1$ = "..\images\tw4_image.jpg"
  60.     ImageFile2$ = "..\samples\1iddnext.bmp"
  61.     ImageFile3$ = "..\samples\geol.bmp"
  62.     ImageFile4$ = "..\samples\mc_log.bmp"
  63.     ImageFile5$ = "..\samples\visa_log.bmp"
  64.  
  65. RepeatLoop:
  66. Command_level:
  67.     Button()
  68.     InfoMenu(REMOVE)
  69.     WaitInput(100)
  70.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  71.     ProgressBar(ENABLE,0,0,cx2,10)
  72.     Value = 6
  73.     UpdateProgressBar(Value,ABSOLUTE)
  74.     SetMenu("E&xit!",Run_leave,
  75.         ENDPOPUP,
  76.         "&Repeat",VGA_OK,
  77.         ENDPOPUP,
  78.         "Contact &Information",Contact,
  79.         ENDPOPUP,
  80.         "&PC requirements",PC_environment,
  81.         ENDPOPUP,
  82.         "How to &Order",Ordering,
  83.         ENDPOPUP,
  84.         "&Help",IGNORE,
  85.         "Show &PiXCL Command Reference",Toolbox_Help,
  86.         SEPARATOR,
  87.         "&About",About_Box,
  88.         ENDPOPUP)
  89.  
  90.     WinShow(NewCaption$,MAXIMIZE, Res)
  91. {    Draw a blue shaded background, black at top }
  92.     GoSub    Draw_Blue_Shade
  93.  
  94.     WinGetClientRect(NewCaption$ ,cx1,cy1,cx2,cy2)
  95.     DrawSizedBitmap(cx1,cy1,cx2,cy2,ImageFile1$)
  96.     FreeBitmap(ImageFile1$)
  97.  
  98.     If SVGA$ = "Y"
  99.         UseFont("Arial",53,85,BOLD,ITALIC,NOUNDERLINE,255,0,0)
  100.         DrawText(16,32,"PiXCL Tools")    
  101.         UseFont("Arial",53,85,BOLD,ITALIC,NOUNDERLINE,255,255,0)
  102.         DrawText(14,30,"PiXCL Tools")    
  103.  
  104.         UseFont("Arial",17,29,BOLD,ITALIC,NOUNDERLINE,255,224,0)
  105.         DrawText(24,145,"The Imaging Application Development")    
  106.         DrawText(24,175,"Software for Windows 9x / NT4 / 2000")
  107.  
  108.         UseFont("Arial",11,21,BOLD,ITALIC,NOUNDERLINE,255,224,0)
  109.         DrawShadowText(30,215,"Includes TWAIN Scanner and Digital Camera support,",0,0,0,1)    
  110.         DrawShadowText(30,235,"powerful image processing library functions,  plus"0,0,0,1)    
  111.         DrawShadowText(30,255,"WAV file playback and sound card control"0,0,0,1)    
  112.     
  113.         UseFont("Arial",17,29,BOLD,ITALIC,NOUNDERLINE,120,240,240)
  114.         DrawShadowText(25,260,"from VYSOR Integration Inc",0,0,0,1)
  115.         UseFont("Arial",13,25,BOLD,ITALIC,NOUNDERLINE,120,240,240)
  116.         DrawShadowText(40,290,"Gatineau, Quebec, CANADA",0,0,0,1)
  117.     Endif
  118.  
  119.  
  120.     If XGA$ = "Y"
  121.         UseFont("Arial",69,109,BOLD,ITALIC,NOUNDERLINE,255,255,0)
  122.         DrawShadowText(20,40,"PiXCL Tools",255,0,0,2)    
  123.  
  124.         UseFont("Arial",21,37,BOLD,ITALIC,NOUNDERLINE,255,224,0)
  125.         DrawShadowText(30,155,"The Imaging Application Development",0,0,0,1)    
  126.         DrawShadowText(30,195,"Software for Windows 9x / NT4 / 2000",0,0,0,1)
  127.  
  128.  
  129.         UseFont("Arial",11,23,BOLD,ITALIC,NOUNDERLINE,255,224,0)
  130.         DrawShadowText(30,245,"Includes TWAIN Scanner and Digital Camera support,",0,0,0,1)    
  131.         DrawShadowText(30,265,"powerful image processing library functions,",0,0,0,1)    
  132.         DrawShadowText(30,285,"USB live video camera capture, plus",0,0,0,1)    
  133.         DrawShadowText(30,305,"WAV file playback and MCI sound card control.",0,0,0,1)    
  134.  
  135.  
  136.         UseFont("Arial",17,29,BOLD,ITALIC,NOUNDERLINE,120,240,240)
  137.         DrawShadowText(30,360,"from VYSOR Integration Inc",0,0,0,1)
  138.         UseFont("Arial",13,25,BOLD,ITALIC,NOUNDERLINE,120,240,240)
  139.         DrawShadowText(40,400,"Gatineau, Quebec, CANADA",0,0,0,1)
  140.  
  141.  
  142.  
  143.     Endif
  144.  
  145.  
  146. Banner0:    
  147.     If VGA$ = "Y"
  148.         UseFont("Arial",9,13,NOBOLD,NOITALIC,NOUNDERLINE,224,224,224)
  149.         DrawText(10,290,"Thank you for trying this")
  150.           DrawText(10,305,"demonstration program !")
  151.             DrawText(10,325,"The program describes and demonstrates the")
  152.             DrawText(10,340,"capabilities of the PiXCL language.")
  153.         DrawText(10,355,"Click on any 3D button or Menu item to continue.")
  154.     Endif
  155. Banner1:
  156.     If SVGA$ = "Y"
  157.         UseFont("Arial",11,17,NOBOLD,NOITALIC,NOUNDERLINE,224,224,224)
  158.         DrawText(12,360,"Thank you for trying this")
  159.         DrawText(12,380,"demonstration program !")
  160.         UseFont("Arial",9,15,NOBOLD,NOITALIC,NOUNDERLINE,224,224,224)
  161.         DrawText(12,410,"The program describes and demonstrates the")
  162.         DrawText(12,430,"capabilities of the PiXCL language.")
  163.         DrawText(12,460,"Click on any 3D button or Menu item to continue.")
  164.     Endif
  165. Banner2:
  166.     If XGA$ = "Y"
  167.         UseFont("Arial",15,21,NOBOLD,NOITALIC,NOUNDERLINE,224,224,224)
  168.         DrawText(15,500,"Thank you for trying this")
  169.         DrawText(15,530,"demonstration program !")
  170.         UseFont("Arial",11,19,NOBOLD,NOITALIC,NOUNDERLINE,224,224,224)
  171.         DrawText(15,560,"The program describes and demonstrates the")
  172.         DrawText(15,590,"capabilities of the PiXCL language.")
  173.         DrawText(15,620,"Click on any 3D button or Menu item to continue.")
  174.     Endif
  175. Banner3:
  176.  
  177.  
  178. Btn1:
  179.      If SVGA$ = "Y"
  180.         SetKeyBoard("C",Screen_1,"c",Screen_1)
  181.         WaitInput(100)
  182.         Button( 615,423,700,453,PUSH,"&Continue",Screen_0,
  183.            705,423,790,453,PUSH,"E&xit!",Run_Leave)
  184.     Endif
  185. Btn2:
  186.     If XGA$ = "Y"
  187.         SetKeyBoard("C",Screen_1,"c",Screen_1)
  188.          WaitInput(100)
  189.         Button( 700,600,830,680,PUSH,"&Continue",Screen_0,
  190.            850,600,980,680,PUSH,"Exit!",Run_Leave)
  191.     Endif
  192. Btn3:
  193.     UseCursor(ARROW)
  194.  
  195. Do_Nothing:
  196. Wait_for_input:
  197.     WaitInput()
  198.  
  199. {====================================================================}
  200. Run_leave:
  201.     WinClose("PiXCL Runtime",Res)
  202.     WinClose("Windows Help",Res)
  203.     End
  204. {====================================================================}
  205. Toolbox_help:
  206.     WinExist("PiXCL Help",Res)
  207.     If Res = 0
  208.         Helpfile$ = "..\pixclhlp.hlp"
  209.         WinHelp(HelpFile$,CONTENTS,"")
  210.     Else
  211.         WinShow("PiXCL Help v4.4",TOPMOST,Res)
  212.     Endif
  213. Toolbox_help_OK:
  214.     Goto Wait_for_Input
  215.  
  216. {====================================================================}
  217.  
  218.  
  219. About_Box:
  220.     AboutUser("PiXCL Tools Rights Notice.",
  221.     "PiXCL Tools Demonstration Program",
  222. "32 bit Windows application designed, written and copyright ⌐ (1994-2000) by VYSOR Integration Inc, Quebec, Canada, using the PiXCL Toolkit. All Rights Reserved.")
  223.     Goto Wait_for_input
  224.  
  225. Contact:
  226.     Chr(13,cr$ )
  227.     Address$ = "VYSOR Integration Inc." + cr$ + "91 rue Bocage, Suite B"
  228.                + cr$ + "Gatineau, Quebec," + cr$ + "CANADA J8T 5W5"
  229.                + cr$ + "ph (819) 246-7792" + cr$ + "fx (819) 568-6859"
  230.  
  231.     DialogBox(0,0,210,160,"Contacting VYSOR Integration Inc", CAP_CTR,
  232.                15,25, 48,48, ICON01, 
  233.               150,40,190,55,"&Cancel", 5, Res,  {rtn 0}
  234.                40,10,120,50,STATIC,CENTER,Address$,
  235.               10,60,200,100,BTN,GROUP,"&Contact us via email",
  236.               20,75,190,95,BTN, PUSH,"&info@vysor.com",  {rtn 3}
  237.               10,110,200,150,BTN,GROUP,"&Go to our Web site for more information",
  238.               20,125,190,145,BTN, PUSH,"http://www.vysor.com"  {rtn 5}
  239.               ) 
  240.  
  241.     FindExecutable("..\learning\vysorweb.htm","",WebBrowser$,Rss)
  242.     If Res = 3 
  243.         RDBOpenKey(@RDB_CLASSES_ROOT,
  244.         "mailto\shell\open\command",OutHandle1)
  245.         RDBQueryValue(OutHandle1,"",DefaultMailer$,Res)
  246.         RDBCloseKey(OutHandle1,Res)
  247.         If DefaultMailer$ <> ""
  248.         StrRepl(DefaultMailer$,"%1","",Res)
  249.         Else
  250.         DefaultMailer$ = WebBrowser$ + " http://www.vysor.com\vcontact.htm"
  251.         Endif
  252.         Run(DefaultMailer$)
  253.     Endif
  254.  
  255.     If Res = 5 
  256.         WebSite$ = WebBrowser$ + " http://www.vysor.com"
  257.         Run(WebSite$)
  258.     Endif
  259.  
  260.     Goto Wait_for_input
  261.  
  262. PC_environment:
  263.     ChangeMenuItem("Animate2",GRAY,Res)
  264.     ChangeMenuItem("Animate1",GRAY,Res)
  265.  
  266.     MessageBox(OK,1,INFORMATION,
  267. "You must have Windows 95 or NT4 with Internet 
  268. Explorer 4.01 or later with Active Desktop installed, 
  269. or Windows 98 or 2000. PiXCL will not run under 
  270. NT 3.51. We recommend upgrading to NT 4.0, with 
  271. all available Service Packs.
  272.  
  273. Only standard installed Windows True Type 
  274. fonts are used, but you can install and use 
  275. others if you need.
  276.  
  277. You must have a 486/dx4-100 or better. As with all 
  278. Windows programs, more memory is better. The 
  279. best view comes with at least 1024x768x256 
  280. or more colors. We recommend a video card with at 
  281. least 2MB of video ram for optimum image display. 
  282. The quality of your Windows video device driver
  283. may also affect the display.
  284.  
  285. PiXCL also supports sound cards. A Soundblaster (tm)
  286. or compatible card is a useful option. If a sound
  287. card is not installed, sound commands are ignored.
  288.  
  289. PiXCL supports all TWAIN-compatible scanners and 
  290. digital cameras, plus the Visioneer PaperPort.", 
  291. "Your PC requirements", Res)
  292.     Goto Wait_for_input
  293.  
  294.  
  295. {======================================================================}
  296. Screen_0: {Find out what the reader is interested in and provide a bit
  297.          of extra information. }
  298.     UseCursor(WAIT)
  299.     SetKeyBoard()
  300.     WaitInput(100)
  301.     Button()
  302.     WaitInput(100)
  303.     
  304.     GoSub Draw_Blue_Shade
  305.     
  306.     UseCursor(ARROW)
  307.     GoSub Ask_Status    {waits for jump to Ask_Status_1-6 below}
  308.     WaitInput()
  309.  
  310.  
  311. Ask_Status_1:
  312.     DrawFrameControl(10, 50,34, 74,BUTTONRADIO, CHECKED,Res)
  313.     Ask_Status$ = "Professional"
  314.     Goto Ask_Status_Done
  315.  
  316.  
  317. Ask_Status_2:
  318.     DrawFrameControl(10, 80,34,104,BUTTONRADIO, CHECKED,Res)
  319.     Ask_Status$ = "Business"
  320.     Goto Ask_Status_Done
  321.  
  322. Ask_Status_3:
  323.     DrawFrameControl(10,110,34,134,BUTTONRADIO, CHECKED,Res)
  324.     Ask_Status$ = "Programmer"
  325.     Goto Ask_Status_Done
  326.  
  327. Ask_Status_4:
  328.     DrawFrameControl(10,140,34,164,BUTTONRADIO, CHECKED,Res)
  329.     Ask_Status$ = "Educator"
  330.     Goto Ask_Status_Done
  331.  
  332. Ask_Status_5:
  333.     DrawFrameControl(10,170,34,194,BUTTONRADIO, CHECKED,Res)
  334.     Ask_Status$ = "Student"
  335.     Goto Ask_Status_Done
  336.  
  337. Ask_Status_6:
  338.     DrawFrameControl(10,200,34,224,BUTTONRADIO, CHECKED,Res)
  339.     Ask_Status$ = "Home"
  340.  
  341. Ask_Status_Done:
  342.     SetMouse()
  343.     GoSub Define_Interest {waits for jump to Int_Status_1-6 below}
  344.     WaitInput()
  345.  
  346. Int_Status_1:
  347.     DrawFrameControl(10,300,34,324,BUTTONRADIO, CHECKED,Res)
  348.     Int_Status$ = "Presentation"
  349.     Goto Define_Interest_Done
  350.  
  351. Int_Status_2:
  352.     DrawFrameControl(10,330,34,354,BUTTONRADIO, CHECKED,Res)
  353.     Int_Status$ = "Images"
  354.     Goto Define_Interest_Done
  355.  
  356. Int_Status_3:
  357.     DrawFrameControl(10,360,34,384,BUTTONRADIO, CHECKED,Res)
  358.     Int_Status$ = "Courses"
  359.     Goto Define_Interest_Done
  360.  
  361. Int_Status_4:
  362.     DrawFrameControl(10,390,34,414,BUTTONRADIO, CHECKED,Res)
  363.     Int_Status$ = "Systems"
  364.     Goto Define_Interest_Done
  365.  
  366. Int_Status_5:
  367.     DrawFrameControl(10,420,34,444,BUTTONRADIO, CHECKED,Res)
  368.     Int_Status$ = "Multimedia"
  369.     Goto Define_Interest_Done
  370.  
  371. Int_Status_6:
  372.     DrawFrameControl(10,450,34,474,BUTTONRADIO, CHECKED,Res)
  373.     Int_Status$ = "Education"
  374.  
  375. Define_Interest_Done:
  376.     SetMouse()
  377.  
  378. {======================================================================}
  379. Screen_1:
  380. { Program has continued ... from first screen }
  381. { clear buttons, background and put in a new colour and style. }
  382.     SetKeyBoard()
  383.     WaitInput(100)
  384.     Button()
  385.     WaitInput(100)
  386.     SetCtrlMouse()
  387.     SetMouse()
  388.  
  389.     GoSub Draw_Blue_Shade
  390.     UseFont("Arial",17,29,NOBOLD,ITALIC,NOUNDERLINE,255,255,255)
  391.     DrawText(40,200,"Thank you")
  392.     WaitInput(600)
  393.  
  394.     GoSub Draw_Green_Shade
  395.  
  396. { Depending on the value of Ask_Status$, display some benefit statements.}
  397. Blah:
  398.         UseFont("Arial",17,29,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
  399.     
  400.     If Ask_Status$ = "Professional"
  401.         DrawTextExt(20,20,540,600,
  402. "PiXCL Tools is a very affordable addition to Windows that anyone can use ... and you don't need to be a hot-shot programmer to do it !
  403.  
  404.  
  405. Computer professionals looking for a simple but effective multimedia toolkit and system utility will find PiXCL useful and easy to learn ...",LEFT)
  406.     Endif
  407.  
  408.  
  409.     If Ask_Status$ = "Business"
  410.         DrawTextExt(20,20,540,600,
  411. "PiXCL Tools is a very affordable addition to Windows that anyone can use ... 
  412. and you won't need to hire a hot-shot programmer to do it!
  413.  
  414.  
  415. Small business owners looking for a simple but effective multimedia presentation toolkit will find PiXCL useful and easy to learn ...",LEFT)
  416.     Endif
  417.     
  418.  
  419.     If Ask_Status$ = "Programmer"
  420.         DrawTextExt(20,20,540,600,
  421. "PiXCL Tools is a very affordable addition to your Windows toolkit ... and can be used with most of the tools you already own.
  422.  
  423.  
  424. As an experienced Windows programmer, you will have no difficulty learning the syntax ... and be running programs in a few hours.",LEFT)
  425.     Endif
  426.  
  427.  
  428.     If Ask_Status$ = "Educator"
  429.         DrawTextExt(20,20,540,600,
  430. "PiXCL Tools is a very affordable addition to your Windows toolkit ... and can be used with most of the tools you already own.
  431.  
  432. Educators can easily use PiXCL to develop fully interative training courses with images, graphics and .WAV audio files as required.
  433.  
  434. High school students can use PiXCL as an introduction to graphics and multimedia.", LEFT)
  435.     Endif
  436.  
  437.     If Ask_Status$ = "Student"
  438.         DrawTextExt(20,20,540,600,
  439. "PiXCL Tools is a very affordable addition to your Windows PC, even on a student's budget.
  440.  
  441. PiXCL provides you with a comprehensive introduction to Windows program development using graphics, images and multimedia functions.",LEFT)
  442.     Endif
  443.  
  444.     If Ask_Status$ = "Home"
  445.         DrawTextExt(20,20,540,600,
  446. "PiXCL Tools is a very affordable addition to your Windows PC, with its programmable graphics and imaging capability.
  447.  
  448. Learning to use PiXCL is fast and fun, and will extend your understanding of how Windows works with graphics, images and multimedia functions.", LEFT)
  449.     Endif
  450.  
  451.  
  452.  
  453.     GoSub DrawPrice
  454.     
  455.     
  456.  
  457.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  458.     SetMouse(cx1,cy1,cx2,cy2,Blah_0,X,Y)
  459.     UseFont("Arial",7,15,NOBOLD,NOITALIC,NOUNDERLINE,255,255,0)
  460.     Ypos = cy2 - 80
  461.     DrawText(20,Ypos,"Click on the screen to continue")
  462.     WaitInput()
  463.  
  464.  
  465.  
  466. { Depending on the value of Int_Status$, display some benefit statements.}
  467. Blah_0:
  468.     UseCursor(WAIT)
  469.     SetMouse()
  470.     GoSub Draw_Green_Shade    
  471.     UpdateProgressBar(Value,RELATIVE)
  472.     UseCursor(ARROW)
  473.  
  474.     UseFont("Arial",19,33,BOLD,ITALIC,NOUNDERLINE,224,224,224)
  475.     DrawText(10,40,"With PiXCL Tools, you can ...")
  476.     If SVGA$ = "Y" Then Set Bwide = 9     Set Bhigh = 19
  477.     If   XGA$ = "Y" Then  Set Bwide = 11     Set Bhigh = 23
  478.     WaitInput(1000)
  479.  
  480.     UseFont("Arial",Bwide,Bhigh,NOBOLD,NOITALIC,NOUNDERLINE,0,255,255)
  481.     DrawTextExt(20,100,600,200,
  482. "Develop interactive training programs including images and WAV sound files.",LEFT)
  483.     
  484.     WaitInput(Pause)
  485.     
  486.     DrawTextExt(20,200,600,300,
  487. "Make effective interactive presentations to clients using graphics, images and sound files on any 32 bit Windows PC.",LEFT)
  488.  
  489.     WaitInput(Pause)
  490.  
  491.     DrawTextExt(20,300,600,400,
  492. "Create marketting diskette or CD programs that describe your department's or organisation's products and services.",LEFT)
  493.  
  494.     WaitInput(Pause)
  495.  
  496.     DrawTextExt(20,400,700,600,
  497. "Forget about using BAT files in a DOS window ... any
  498. system management issue that you had to do with a BAT
  499. file you can now do as a true Windows application ... 
  500. and writing PiXCL code is no harder than writing 
  501. DOS batch files.",LEFT)
  502.  
  503.     UseFont("Arial",9,19,NOBOLD,NOITALIC,NOUNDERLINE,255,255,0)
  504.     DrawText(40,550,"Click on text to continue")
  505.  
  506.     SetMouse(cx1,cy1,cx2,cy2,Blah_1,X,Y)
  507.     WaitInput()
  508.  
  509.     
  510. Blah_1:    
  511.     UseCursor(WAIT)
  512.     SetMouse()
  513.     UseFont("Arial",Bwide,Bhigh,NOBOLD,NOITALIC,NOUNDERLINE,255,160,0)
  514.  
  515.     UpdateProgressBar(Value,RELATIVE)
  516.     GoSub Draw_Green_Shade    
  517.     UseCursor(ARROW)
  518.  
  519.  
  520.     UseFont("Arial",Bwide,Bhigh,NOBOLD,NOITALIC,NOUNDERLINE,255,160,0)
  521.     DrawText(20,130,"PiXCL is uncomplicated, and you will learn it very")    
  522.     DrawText(20,150,"quickly. Most new PiXCL users have their first") 
  523.     DrawText(20,170,"simple programs running in an afternoon.") 
  524.  
  525.     WaitInput(Pause)
  526.  
  527.     MessageBox(YESNOCANCEL,1,QUESTION,"Want to see PiXCL code for the traditional 'Hello World' program ?. CANCEL will end this demo.",
  528.             "How uncomplicated is PiXCL ?",Res)
  529.     If Res = 3 Then End
  530.     If Res = 1
  531.         GoSub Draw_Blue_Shade
  532.         Prog$ = 
  533. "Initialize:
  534.         Win$ = ''Sample PiXCL App''
  535.         UseCaption(Win$)
  536.         UseCoordinates(PIXEL)
  537.         WinLocate(Win$,100,100,400,320,Res)
  538.         SetMenu(''Exit!'',Leave,
  539.                 ENDPOPUP)
  540.  
  541.         DrawText(10,10,''Hello World'')
  542. Wait_for_Input:
  543.         WaitInput()
  544. Leave:
  545.         End"
  546.  
  547.         UseFont("Arial",9,19,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
  548.         DrawTextExt(60,20,500,400,Prog$,LEFT) FreeVar(Prog$)
  549.         UseFont("Arial",9,19,NOBOLD,NOITALIC,NOUNDERLINE,0,255,255)
  550.         DrawText(60,300,"Left Click on the PiXCL code to continue.")
  551.         DrawText(60,330,"Right Click on the PiXCL code to run it.")
  552.         SetMouse(60,20,500,400,Blah_2,X,Y)
  553.         SetRightMouse(60,20,500,400,Blah_1a,X,Y)
  554.         WaitInput()
  555.  
  556. Blah_1a:
  557.        SetRightMouse()
  558.         If PiXCLMajor = 4
  559.             Run("..\pixcl44 ..\samples\hellowld.pxl")
  560.         Else
  561.             Run("..\pixcl50 ..\samples\hellowld.pxl")
  562.         Endif
  563.         WaitInput()
  564.  
  565.     Endif
  566.  
  567.  
  568. Blah_2:
  569.     UseCursor(WAIT)
  570.     SetMouse()
  571.     SetRightMouse()
  572.     GoSub Draw_Blue_Shade    
  573.     UseCursor(ARROW)
  574.     
  575.     MessageBox(YESNOCANCEL,1,QUESTION,
  576. "The full PiXCL Command Reference and User Manual
  577. is available in the Help file with this Demonstration
  578. version of PiXCL Tools. See the Help menu item above.
  579.  
  580. Would you like to see the PiXCL Command Reference Help ?
  581.  
  582. Click CANCEL to end this demo program.",
  583.     "More information is available to you",Res)
  584.  
  585.     If Res = 3 Then End
  586.     If Res = 1
  587.         Helpfile$ = "..\pixclhlp.hlp"
  588.         WinHelp(HelpFile$,CONTENTS,"")
  589.     Endif
  590.     UseFont("Arial",Bwide,Bhigh,NOBOLD,NOITALIC,NOUNDERLINE,255,160,0)
  591.  
  592.     UpdateProgressBar(Value,RELATIVE)
  593.  
  594.     UseFont("Arial",Bwide,Bhigh,NOBOLD,NOITALIC,NOUNDERLINE,0,255,255)
  595.     DrawTextExt(20,20,760,160,
  596. "PiXCL is a true Windows programming language, with over 700 commands for file, disk, string and math functions, powerful direct access to your screen to draw graphics and bitmap images, AND more than 40 image processing point and matrix operation commands.",LEFT)
  597.     WaitInput(Pause)
  598.     DrawText(20,170,"This demo program is written in PiXCL, and") 
  599.     WaitInput(Pause)
  600.     DrawText(20,200,"so is this next dynamic action window.") 
  601.     WaitInput(800)
  602.     If PiXCLMajor = 4
  603.         Run("pixcl44 ..\samples\sun2.pxl")
  604.     Else
  605.         Run("pixcl50 ..\samples\sun2.pxl")
  606.     Endif
  607.  
  608. SuperNova_1:
  609.     WaitInput(1000)
  610.     WinExist("Supernova",Res)
  611.     If Res = 1 Then Goto SuperNova_1
  612.  
  613.     MessageBox(YESNO,1,QUESTION,"Want to see the source for the SuperNova demo?",
  614.     "Anyone can learn the PiXCL language",Res)
  615.     If Res = 1 
  616.         WinShow(NewCaption$,NOTOPMOST,Res)
  617.         Run("NotePad.exe ..\samples\sun2.pxl")
  618.         MessageBox(OK,1,QUESTION,"Click OK or press Space to continue",
  619.         "Ready to proceed...",Res)
  620.     Endif
  621.  
  622.  
  623. Includes_1:
  624.     UseCursor(WAIT)
  625.     GoSub Draw_Blue_Shade    
  626.     UseCursor(ARROW)
  627.  
  628.     UseFont("Arial",Bwide,Bhigh,NOBOLD,NOITALIC,NOUNDERLINE,0,255,255)
  629.     DrawText(20,20,"PiXCL Tools is comprehensive but uncomplicated.")
  630.     DrawText(20,40,"Included in FreePiXCL and Licensed versions are ...")
  631.     WaitInput(1000)
  632.     UseFont("Arial",Bwide,Bhigh,NOBOLD,NOITALIC,NOUNDERLINE,255,255,0)
  633.     DrawText(20,80,"An integrated multiple document PiXCL source code editor")
  634.     DrawText(20,100,"with context sensitive command help, on-line user manual") 
  635.     DrawText(20,120,"to test, debug and  build your runtime programs.") 
  636.     WaitInput(2500)
  637.     UseFont("Arial",Bwide,Bhigh,NOBOLD,NOITALIC,NOUNDERLINE,0,255,255)
  638.     DrawText(20,170,"Complete on-line command help reference, including")
  639.     DrawText(20,190,"comprehensive code examples, so you will quickly") 
  640.     DrawText(20,210,"learn the PiXCL language syntax.") 
  641.     WaitInput(2500)
  642.     UseFont("Arial",Bwide,Bhigh,NOBOLD,NOITALIC,NOUNDERLINE,255,128,0)
  643.     DrawText(20,250,"A licensed Runtime EXE builder that produces true")
  644.     DrawText(20,270,"32-bit Windows executables. These can be distributed") 
  645.     DrawText(20,290,"royalty-free to your users.") 
  646.  
  647.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  648.     SetMouse(cx1,cy1,cx2,cy2,Includes_2,X,Y)
  649.     SetRightMouse(20, 80,500,140,Include_1a,X,Y,
  650.               20,170,500,240,Include_1b,X,Y,
  651.               20,250,500,320,Include_1c,X,Y)
  652.  
  653.     UseFont("Arial",7,15,NOBOLD,NOITALIC,NOUNDERLINE,255,255,0)
  654.     DrawText(20,350,"Right Click on the text to show tool.")
  655.     DrawText(20,380,"Left Click on the screen to continue.")
  656.     WaitInput()
  657.  
  658. Include_1a:
  659.     InvertRectangle(20, 80,680,140)
  660.     Cmd$ = "..\pxl_edit.exe"
  661.     Run(Cmd$)
  662.     InvertRectangle(20, 80,680,140)
  663.     WaitInput() 
  664.  
  665. Include_1b:
  666.     InvertRectangle(20,170,600,240)
  667.     HelpFile$ = "..\pixclhlp.hlp"
  668.     WinHelp(HelpFile$,CONTENTS,"")
  669.     InvertRectangle(20,170,600,240)
  670.     WaitInput() 
  671.  
  672. Include_1c:
  673.     InvertRectangle(20,250,600,320)
  674.     AppWindowHandle(Handle,Handle$, geoPiXCLFlag,Major,Minor)
  675.     If Major = 4
  676.         Cmd$ = "..\pxl_make44.exe"
  677.     Else
  678.         Cmd$ = "..\pxl_make50.exe"
  679.     Endif
  680.     Run(Cmd$)
  681.     InvertRectangle(20,250,600,320)
  682.     WaitInput() 
  683.  
  684. Includes_2:
  685.     SetMouse()
  686.     SetRightMouse()
  687.     GoSub Draw_Green_Shade    
  688.     UpdateProgressBar(Value,RELATIVE)
  689.  
  690.  
  691. { What are the features of the PiXCL Tools program }
  692.     UseFont("Arial",13,25,BOLD,ITALIC,NOUNDERLINE,255,255,255)
  693.     DrawText(10,10,"What information display functions can PiXCL Tools offer you ?")
  694.     WaitInput(1200)
  695.     UseFont("Arial",11,21,NOBOLD,NOITALIC,NOUNDERLINE,0,255,255)
  696.     DrawTextExt(10,50,660,150,
  697. "Up to this point, you have seen backgrounds drawn, 
  698. various text sizes, styles, colors and fonts, plus
  699. a few MessageBoxes and some 3D buttons.",LEFT)
  700.  
  701.     DrawTextExt(10,170,600,250,
  702. "Your programs provide feedback to you with MessageBoxes which can be created in all the common styles ... for example ...",LEFT)
  703.     WaitInput(1500)
  704.  
  705.  
  706.  
  707. { MessageBoxes (Several types)  }
  708.     MessageBox(OK,1,INFORMATION,
  709. "MessageBoxes can be like this one ... informative. 
  710. This could be simple help for menu operations, or 
  711. program property information.",
  712.     "Information Box",Res)
  713.  
  714.     MessageBox(OKCANCEL,1,EXCLAMATION,
  715. "or like this one ... a bit more emphasis. Perhaps you
  716. need to remind your user that an action is about to occur.",
  717.     "Exclamation Box",Res)
  718.  
  719.     MessageBox(YESNO,1,QUESTION,
  720. "or like this one ... asking you what to do now. You will
  721. use this type of message box very often. And it is all easily
  722. programmable with one simple command.",
  723.     "Question Box",Res)
  724.  
  725.     MessageBox(RETRYCANCEL,1,QUESTION,
  726. "or like this one ... retry some operation that did not 
  727. complete as expected. Actions involving floppy disks 
  728. will often require this type of message.",
  729.     "Retry-Cancel Box",Res)
  730.  
  731.     DirGetWindows(WinDir$)
  732.     Themic$ = WinDir$ + "\media\The Microsoft Sound.wav"
  733.     FileExist(Themic$,Res)
  734.     If Res = 1 Then WAVPlaySound(Themic$,ASYNC,FILENAME,Res)
  735.     MessageBox(YESNOCANCEL,1,STOP,
  736. "or like this one ... when something has gone wrong. 
  737. You can include an audible message too.  If your PC 
  738. has a sound card enabled, you should have heard the 
  739. standard Microsoft sound ! You can use your own WAV files as 
  740. well.",
  741.     "Stop Box",Res)
  742.  
  743.     MessageBox(OK,1,NOICON,
  744. "or like this one with no icon at all. It can be used
  745. for general information. The previous MessageBoxes 
  746. can have one, two or three buttons,  combining either 
  747. 'OK', 'YES', 'NO' or 'CANCEL' labels.",
  748.     "No Icon Box",Res)
  749.  
  750. Blah_3:
  751.     MessageBox(ABORTRETRYIGNORE,3,QUESTION,
  752. "Need a MessageBox like this one ? Press IGNORE to keep on with the demo. Press the other buttons and see what happens.",
  753.     "Another style with three buttons",Res)
  754.     Msg$ = "Use this option when a process such as
  755. floppy disk access needs to be stopped."
  756.     If Res = 1 Then MessageBox(OK,1,INFORMATION,Msg$,"Abort button pressed",Res) Goto Blah_3
  757.     Msg$ = "Use this option when a process such as
  758. floppy disk access needs to be retried."
  759.     If Res = 2 Then MessageBox(OK,1,INFORMATION,Msg$,"Retry button pressed",Res) Goto Blah_3
  760.  
  761. Blah_3a:
  762.     AboutUser("Your Application Title goes here!",
  763. "Describe your PiXCL Application in this text region",
  764. "Does your application need an 'About...' box ? This dialog box is provided in PiXCL to describe any program you write. The current default icon is displayed as well.")
  765.  
  766.  
  767.     { TextBoxes }
  768.     GoSub Draw_Green_Shade    
  769.     DrawTextExt(10,200,600,400,
  770. "You can enter information into a TextBox for later processing. Textbox titles and text are programmable, and the input strings can be converted to integers if required",LEFT)
  771.  
  772.     WaitInput(1200)
  773.     Set Text$ = 
  774. "Make a few changes to the highlighted text in the edit box. Click OK to Continue; Click CANCEL to Ignore"
  775.     Set Caption$ = "Example of a TextBox"
  776.     Set Input$ = "Default text can be displayed, like this, and editted"
  777.     TextBox(Text$, Caption$,Input$,Btn)
  778.     MessageBox(OK,1,INFORMATION,Input$,"Result of previous Text Entry",Res)
  779.  
  780.     GoSub Draw_Green_Shade    
  781.     UpdateProgressBar(Value,RELATIVE)
  782.  
  783.     DrawTextExt(10,200,600,400,
  784. "You can select an item from a ListBox for later processing. A list might be filenames, or values read from an INI file or the system registry.",LEFT)
  785.  
  786.     WaitInput(1200)
  787.     Set Caption$ = "Select an item from the list..."
  788.     Set List$ = 
  789. "Item#01 Item#02 Item#03 Item#04 Item#05 Item#06 Item#07 Item#08 Item#09 Item#10 Item#11 Item#11 Item#12 Item#13 Item#14 Item#15 Item#16 Item#17 Item#18"
  790.     ListBox(Caption$, List$, " ", Res$)
  791.     MessageBox(OK,1,INFORMATION, Res$,"Result of previous Selection",Res)
  792.  
  793.     MessageBox(YESNO,1,QUESTION, "See examples of the available types?",
  794.     "More information is available",Res)
  795.  
  796.     If Res = 1
  797.         If PiXCLMajor = 4
  798.           Cmd$ = "pixcl44 dlgboxes.pxl"
  799.         Else
  800.           Cmd$ = "pixcl50 dlgboxes.pxl"
  801.         Endif
  802.         Run(Cmd$ )
  803.     Endif
  804. DlgLoop:
  805.     WinExist("Introducing Dialog Boxes",Res)
  806.     If Res = 1 Then WaitInput(2000) Goto DlgLoop
  807.  
  808. { 3D buttons }
  809.     UseCursor(WAIT)
  810.     GoSub Draw_Red_Shade
  811.     UseCursor(ARROW)
  812.     UseFont("Arial",13,21,BOLD,ITALIC,NOUNDERLINE,224,224,224)
  813.     DrawText(10,10,"3D buttons can be any size or position !")
  814.     WaitInput(1200)
  815.     
  816.     UseFont("Arial",13,21,NOBOLD,NOITALIC,NOUNDERLINE,224,224,0)
  817.     DrawText(10,70,"They are grey with a single line of text,")
  818.     DrawText(10,100,"and appear to depress when you click on them.")
  819.     DrawText(10,130,"Here is a more complex example.")
  820.     WaitInput(Pause)
  821.     UpdateProgressBar(Value,RELATIVE)
  822.     Gosub UNIX_GUI
  823.     WaitInput()
  824.  
  825. Quit_GUI:
  826.     Button()
  827.     SetMouse()
  828.     Drawbackground
  829.  
  830. { Active Areas / Hot Spots }
  831.     UseCursor(WAIT)
  832.     GoSub Draw_Orange_Shade    
  833.     UseCursor(ARROW)
  834.     UseFont("Arial",13,21,BOLD,ITALIC,NOUNDERLINE,224,224,224)
  835.     DrawText(10,10,"You can also have Mouse Active Areas or Hot Spots !")
  836.     WaitInput(1200)
  837.  
  838.     UseFont("Arial",13,21,BOLD,NOITALIC,NOUNDERLINE,224,224,0)
  839.     DrawText(10,100,"These can be any size, colour or can even be an")
  840.     DrawText(10,130,"image. Here is a more complex example using")
  841.     DrawText(10,160,"Active Areas created from images, 3D buttons")
  842.     DrawText(10,190,"and different fonts.")
  843.     WaitInput(Pause)
  844.  
  845. Blah_4:
  846.     MessageBox(OK,1,EXCLAMATION,
  847. "We are about to run a second PiXCL program to demonstrate 
  848. mouse active areas. Watch what happens automatically if 
  849. the specified EXE file cannot be found...",
  850.     "Running External Programs",Res)
  851.     Run("BLAH.exe")
  852.  
  853.     MessageBox(RETRYCANCEL,1,EXCLAMATION,
  854. "The EXE file PiXCL tried to run did not exist. 
  855.  
  856. Let's try that again with the correct filename ...",
  857.     "Running External Programs",Res)
  858.     If Res = 2 Then Goto Blah_4 
  859.     If PiXCLMajor = 4
  860.            Run("pixcl44 ..\samples\ODI_demo.pxl")
  861.     Else
  862.            Run("pixcl50 ..\samples\ODI_demo.pxl")
  863.     Endif
  864.     WaitInput(1000)
  865. Blah_4a: {NT and 95 need to wait}
  866.     WinExist("TBD Demo",Res)
  867.     WaitInput(1000)
  868.     If Res = 1 Then Goto Blah_4a
  869.  
  870.     UseCursor(WAIT)
  871.     Gosub Draw_Blue_Shade
  872.     UseCursor(ARROW)
  873.     UpdateProgressBar(Value,RELATIVE)
  874.  
  875.     UseFont("Arial",13,21,BOLD,ITALIC,NOUNDERLINE,224,224,224)
  876.     DrawText(10,10,"You can also make floating toolbars with mouse support!")
  877.     WaitInput(1200)
  878.     UseFont("Arial",13,21,BOLD,NOITALIC,NOUNDERLINE,224,224,0)
  879.     DrawText(10,100,"We will now start two PiXCL programs that")
  880.     DrawText(10,130,"demonstrate floating toolbars, toolwindows, and")
  881.     DrawText(10,160,"the various types of mouse input available with PiXCL 4.4")
  882.  
  883.     DrawTextExt(10,220,750,380,
  884. "The twelve Mouse input modes are:
  885. Left-Mouse, Double-Left-Mouse, Shift-Left-Mouse, and Control-Left-Mouse, 
  886. Right-Mouse, Double-Right-MouseShift-Right-Mouse and Control-Right-Mouse, 
  887. Middle-Mouse, Double-Middle-Mouse, Shift-Middle-Mouse and Control-Middle-Mouse",LEFT)
  888.  
  889.  
  890. {more on Mouse handling}
  891.     If PiXCLMajor = 4
  892.         Run("pixcl44 ..\samples\toolbars.pxl")
  893.         Run("pixcl44 mouse44.pxl")
  894.     Else
  895.         Run("pixcl50 ..\samples\toolbars.pxl")
  896.         Run("pixcl50 mouse44.pxl")
  897.     Endif
  898.  
  899.     UpdateProgressBar(Value,RELATIVE)
  900.  
  901. Blah_4b: {NT and 95/98 need to wait}
  902.     WinExist("Standard, View, History and Custom Toolbars in PiXCL" ,Res1)
  903.     WinExist("Mouse Modes in PiXCL",Res2)
  904.     Res = Res1 + Res2
  905.     WaitInput(1000)
  906.     If Res >= 1 Then Goto Blah_4b
  907.  
  908.     UseCursor(WAIT)
  909.     Gosub Draw_Blue_Shade
  910.     UseCursor(ARROW)
  911.     
  912.  
  913. Blah_5:
  914. { Image Import in a range of formats,including PhotoCD. Demo
  915.   DrawBitMap and DrawSizedBitMap.  }
  916.     UseFont("Arial",11,21,NOBOLD,NOITALIC,NOUNDERLINE,224,224,224)
  917.     DrawTextExt(10,10,400,200,
  918. "Image and Graphics files can be displayed! Thirteen of the most commonly used image formats are supported. Various sizes are possible, and can be placed anywhere on your screen under program control.",LEFT)
  919.  
  920.     Pause1 = Pause * 2
  921.     
  922.     
  923. Image0:
  924. Image1:
  925.     If SVGA$ = "Y"
  926.         DrawSizedBitMap(100,200,351,550,ImageFile2$) 
  927.         DrawSizedBitmap(400,190,640,411,ImageFile3$) 
  928.     Endif
  929. Image2:
  930.     If XGA$ = "Y"
  931.         FileExist(ImageFile2$,Res)
  932.         If Res = 1 Then DrawBitMap(100,200,ImageFile2$) 
  933.         FileExist(ImageFile3$,Res)
  934.         WaitInput(1000)
  935.         If Res = 1 Then DrawSizedBitmap(400,190,500,250,ImageFile3$) 
  936.         DrawSizedBitmap(400,190,550,290,ImageFile3$)
  937.         WaitInput(250)
  938.         DrawSizedBitmap(400,190,550,330,ImageFile3$)
  939.         WaitInput(250)
  940.         DrawSizedBitmap(400,190,600,370,ImageFile3$)
  941.         WaitInput(250)
  942.         DrawSizedBitmap(400,190,650,410,ImageFile3$)
  943.         WaitInput(250)
  944.         DrawBitmap(400,190,ImageFile3$)
  945.     Endif
  946. Image3:
  947.     WaitInput(5000)
  948.     UseCursor(WAIT)
  949.     GoSub    Draw_Blue_Shade
  950.     UseCursor(ARROW)
  951.  
  952.     UseFont("Arial",11,21,NOBOLD,NOITALIC,NOUNDERLINE,224,224,224)
  953.     DrawText(10,10,"Image and Graphics files can also be displayed")
  954.     DrawText(10,40,"within dialog frames, and placed anywhere")
  955.     DrawText(10,70,"on your screen with the window control commands.")
  956.     DrawText(10,130,"Please click in the dialog window...")
  957.     WaitInput(800)
  958.  
  959.     WinGetLocation(NewCaption$,X1,Y1,X2,Y2,Res)
  960.     {create a start location for next window}
  961.     X1 = 100   Y1 = 100
  962.     X2 = 400   Y2 = 320
  963.     Count = 0
  964.     If PiXCLMajor = 4
  965.         Run("pixcl44 ..\samples\flash.pxl")
  966.     Else
  967.         Run("pixcl50 ..\samples\flash.pxl")  
  968.     Endif
  969.     WaitInput(200)
  970.     WinLocate("Dialog Frame Box Example",X1,Y1,X2,Y2,Res)
  971.     WinShow("Dialog Frame Box Example",TOPMOST,Res)
  972. Image3_Loop:
  973.     X1 = X1 + 50   Y1 = Y1 + 25
  974.     X2 = X2 + 50   Y2 = Y2 + 25
  975.     WinLocate("Dialog Frame Box Example",X1,Y1,X2,Y2,Res)
  976.     WaitInput(800)
  977.     Count++
  978.     WinLocate(Frame$,X1,Y1,X2,Y2,Res)
  979.     If Count < 10 Then Goto Image3_Loop
  980.  
  981.     WinClose("Dialog Frame Box Example",Res)
  982.     WinShow(NewCaption$,TOPMOST,Res)
  983.  
  984.     GoSub    Draw_Blue_Shade
  985.     { put in IP information.}
  986.     UseFont("Arial",13,21,BOLD,NOITALIC,NOUNDERLINE,224,224,224)
  987.     DrawText(10,10,"All versions of PiXCL Tools provide")
  988.     DrawText(10,40," you with image processing commands.")
  989.  
  990.     UseFont("Arial",11,21,NOBOLD,NOITALIC,NOUNDERLINE,224,224,0)
  991.     DrawTextExt(10,70,550,400,
  992. "All the supported image formats (BMP, JIFF, JPEG, OS2 bitmap, Photo-CD, PCX, PPM, PNG, PSD, RAS, RLE, TGA, TIF ) can be processed with the most commonly needed point and matrix functions, such as brightness and contrast enhancements, red-green-blue channel adjustments, image sharpening, edge detection, 5x5 and 15x15 user defined filters. Geometric functions include image rotation, warping by affine transform, and resampling, all with Nearest Neighbor, Bilinear or Bicubic mode options. PiXCL 5.1 has more options than FreePiXCL.",LEFT)
  993.  
  994.     WaitInput(2000)
  995.  
  996.     MessageBox(YESNO,1,QUESTION,
  997.     "Would you like to see the Image Processing command Help file ?",
  998.     "More information is available.",Res)
  999.  
  1000.     If Res = 1
  1001.         WinShow(NewCaption$,NOTOPMOST,Res)
  1002.         IP_Help$ = "..\pixclhlp.hlp"
  1003.         WinHelp(IP_Help$,KEY,"PiXCL Image Processing Extensions")
  1004.     Endif
  1005.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  1006.     SetMouse(cx1,cy1,cx2,cy2,Image3_IP,X,Y)
  1007.     UseFont("Arial",7,15,NOBOLD,NOITALIC,NOUNDERLINE,255,255,0)
  1008.     Ypos = cy2 - 80
  1009.     DrawText(20,Ypos,"Click on the screen to continue")
  1010.     WaitInput()
  1011.  
  1012.  
  1013. Image3_IP:
  1014.     WinShow(New_Caption$,TOPMOST,Res)
  1015.     UseCursor(WAIT)
  1016.     GoSub    Draw_Blue_Shade
  1017.     UseCursor(ARROW)
  1018.  
  1019.     UseFont("Arial",11,21,NOBOLD,NOITALIC,NOUNDERLINE,224,224,224)
  1020.     DrawText(10,10,"You can display images and read back pixel")
  1021.     DrawText(10,40,"values and graph them like the next example.")
  1022.  
  1023.     If PiXCLMajor = 4
  1024.         Run("pixcl44  ..\samples\profile.pxl")
  1025.     Else
  1026.         Run("pixcl50  ..\samples\profile.pxl")
  1027.     Endif
  1028.     WaitInput(2000)
  1029.     UpdateProgressBar(Value,RELATIVE)
  1030.  
  1031. Image_4:
  1032.     WaitInput(1000)
  1033.     WinExist("Profiling Pixel Values and Histograms",Res)
  1034.     If Res = 1 Then Goto Image_4
  1035.  
  1036.     UseCursor(WAIT)
  1037.     GoSub    Draw_Blue_Shade
  1038.     UseCursor(ARROW)
  1039.     UseFont("Arial",13,21,BOLD,ITALIC,NOUNDERLINE,224,224,224)
  1040.     DrawTextExt(10,10,600,90,
  1041. "PiXCL offers you fast object draw
  1042. commands, controlled either by the
  1043. mouse, keyboard, or your program.",LEFT)
  1044.  
  1045.     WaitInput(1200)
  1046.     UseFont("Arial",13,21,BOLD,NOITALIC,NOUNDERLINE,224,224,0)
  1047.     DrawText(10,100,"We will now run two PiXCL 4.4 graphics draw examples.")
  1048.     DrawText(10,140,"Try the various options, and select Exit! when done...")
  1049.     WaitInput(2000)
  1050.     WinShow(NewCaption$,NOTOPMOST,Res)
  1051.     If PiXCLMajor = 4
  1052.         Run("pixcl44 ..\samples\colbrfon.pxl")
  1053.     Else
  1054.         Run("pixcl50 ..\samples\colbrfon.pxl")
  1055.     Endif
  1056.     WaitInput(1000)
  1057.     Res = 1
  1058.     While Res = 1
  1059.         WaitInput(1000)
  1060.         WinExist("PiXCL Colors, Brushes and Fonts",Res)
  1061.     EndWhile
  1062.  
  1063.  
  1064.     UseCursor(WAIT)
  1065.     GoSub    Draw_Blue_Shade
  1066.     UseCursor(ARROW)
  1067.     DrawText(10,100,"And now the programmable graphics draw example...")
  1068.     DrawText(10,140,"including the set of Frame controls")
  1069.     
  1070.     If PiXCLMajor = 4
  1071.         Run("pixcl44 ..\samples\boxes.pxl")
  1072.     Else
  1073.         Run("pixcl50 ..\samples\boxes.pxl")
  1074.     Endif
  1075.     WaitInput(1000)
  1076.     Res = 1
  1077.     While Res = 1
  1078.         WaitInput(1000)
  1079.         WinExist("2D Drawing and Frame Controls",Res)
  1080.     EndWhile
  1081.  
  1082.     WinShow(NewCaption$,NOTOPMOST,Res)
  1083.  
  1084.  
  1085.     UseCursor(WAIT)
  1086.     GoSub    Draw_Blue_Shade
  1087.     UseCursor(ARROW)
  1088.     UpdateProgressBar(Value,RELATIVE)
  1089.  
  1090.  
  1091. { Fonts and character sizes }
  1092.     UseFont("Arial",13,21,BOLD,ITALIC,NOUNDERLINE,224,224,224)
  1093.     DrawText(10,10,"Any installed Windows font can be used.")
  1094.     WaitInput(Pause)
  1095.     UseFont("Arial",13,21,BOLD,NOITALIC,NOUNDERLINE,224,224,0)
  1096.     DrawText(10,50,"Various sizes and colours can be chosen,")
  1097.     DrawText(10,70,"for example:")
  1098.     WaitInput(Pause)
  1099.     UseFont("Arial",19,29,NOBOLD,ITALIC,NOUNDERLINE,255,255,0)
  1100.     DrawText(10,130,"Arial Regular Italic")
  1101.     UseFont("Arial",19,29,BOLD,NOITALIC,NOUNDERLINE,255,255,0)
  1102.     DrawText(10,160,"Arial Bold ")
  1103.     UseFont("Arial",19,29,BOLD,NOITALIC,NOUNDERLINE,0,255,160)
  1104.     DrawText(10,200,"Wingdings Bold")
  1105.     UseFont("Wingdings",19,29,BOLD,NOITALIC,NOUNDERLINE,0,255,255)
  1106.     DrawText(310,200,"q  x y v Windings Bold")
  1107.     UseFont("Arial",21,39,NOBOLD,NOITALIC,NOUNDERLINE,0,255,255)
  1108.     DrawText(10,240,"Times New Roman Regular")
  1109.  
  1110.     GreenFont = 0
  1111.     UseFont("Arial",19,37,BOLD,ITALIC,UNDERLINE,255,GreenFont,0)
  1112. Font_Loop:
  1113.     DrawText(10,300,"Times New Roman Bold Italic")
  1114.     GreenFont = GreenFont + 16
  1115.     WaitInput(1)
  1116.     If GreenFont > 255 Then GreenFont = 255
  1117.     UseFont("Arial",19,37,BOLD,ITALIC,UNDERLINE,255,GreenFont,0)
  1118.     If GreenFont < 255 Then Goto Font_Loop
  1119.  
  1120.     {reset the font}
  1121.     UseFont("Arial",13,21,BOLD,ITALIC,NOUNDERLINE,224,224,224)
  1122.     Pause2 = Pause * 2
  1123.     WaitInput(Pause2)
  1124.  
  1125. Region_14:
  1126.     WaitInput(100)
  1127.     Button()
  1128.     SetMouse()
  1129.     
  1130. Last0:
  1131.     WaitInput(100)
  1132.     UpdateProgressBar(Value,RELATIVE)
  1133.  
  1134. Ordering:
  1135.     Button()
  1136.     SetKeyBoard()
  1137.     SetMouse()
  1138.     WaitInput(100)
  1139. Last1:
  1140.     If SVGA$ = "Y"
  1141.         UseBackground(TRANSPARENT,0,160,225)
  1142.         UpdateProgressBar(Value,RELATIVE)
  1143.         DrawBackground
  1144.  
  1145.         UseFont("Arial",17,29,BOLD,ITALIC,NOUNDERLINE,0,0,0)
  1146.         DrawText(17,12,"VYSOR Integration Inc ")
  1147.         UseFont("Arial",17,29,BOLD,ITALIC,NOUNDERLINE,128,255,0)
  1148.         DrawText(15,10,"VYSOR Integration Inc ")
  1149.  
  1150.         UseFont("Arial",11,21,BOLD,ITALIC,NOUNDERLINE,0,0,0)
  1151.         DrawText(17,50,"PiXCL Tools for Windows 95 / 98 / NT4 / 2000!")
  1152.         UseFont("Arial",11,21,BOLD,ITALIC,NOUNDERLINE,255,192,0)
  1153.         DrawText(15,48,"PiXCL Tools for Windows 95 / 98 / NT4 / 2000!")
  1154.         UseFont("Arial",11,19,BOLD,ITALIC,NOUNDERLINE,0,0,0)
  1155.         Set Y1 = 92  Set Inc = 22
  1156.     Endif
  1157. Last2:
  1158.     If XGA$ = "Y"
  1159.         UseBackground(TRANSPARENT,0,160,225)
  1160.         DrawBackground
  1161.  
  1162.         UseFont("Arial",23,39,BOLD,ITALIC,NOUNDERLINE,0,0,0)
  1163.         DrawText(17,12,"VYSOR Integration Inc ")
  1164.         UseFont("Arial",23,39,BOLD,ITALIC,NOUNDERLINE,128,255,0)
  1165.         DrawText(15,10,"VYSOR Integration Inc ")
  1166.  
  1167.         UseFont("Arial",15,27,BOLD,ITALIC,NOUNDERLINE,0,0,0)
  1168.         DrawText(17,60,"PiXCL Tools for Windows 95 / 98 / NT4 / 2000 !")
  1169.         UseFont("Arial",15,27,BOLD,ITALIC,NOUNDERLINE,255,192,0)
  1170.         DrawText(15,58,"PiXCL Tools for Windows 95 / 98 / NT4 / 2000 !")
  1171.         UseFont("Arial",13,25,BOLD,ITALIC,NOUNDERLINE,0,0,0)
  1172.         Set Y1 = 105  Set Inc = 26
  1173.     Endif
  1174. Last3:
  1175.  
  1176.     WaitInput(100)
  1177.     UpdateProgressBar(Value,RELATIVE)
  1178.  
  1179.     If SVGA$ = "Y" 
  1180.         DrawTextExt(15,Y1,780,320,
  1181. "This program has showed you some of the possibilities of
  1182. the PiXCL language. PiXCL comes with lots of sample
  1183. code, and we offer free technical support to users via Internet
  1184. email.  A CD-ROM and printed PiXCL User's Manual is an available 
  1185. option. Development of PiXCL is on-going, and updates are 
  1186. available to licensed users from our Web server pages.",LEFT)
  1187.     
  1188.         DrawTextExt(15,290,780,520,
  1189. "Order PiXCL Tools today, by contacting us at
  1190. 91 rue Bocage, Suite B, Gatineau, Quebec, CANADA, J8T 5W5
  1191. Ph  (819) 246-7792  Fx (819) 568-6859  email   sales@vysor.com
  1192. Internet   http://www.vysor.com",LEFT)
  1193.  
  1194.         V1 = 330
  1195.         SetColorPalette(BITMAP)
  1196.        { DrawBitMap(15,V1,ImageFile4$)
  1197.         FreeBitMap(ImageFile4$)}
  1198.         V1 = V1 + 75  V1s = V1 + 1
  1199.         V2 = V1 + Inc  V2s = V2 + 1  V2 = V2 + Inc
  1200.         V3 = V2 + 25
  1201.         UseFont("Arial",15,33,BOLD,NOITALIC,NOUNDERLINE,0,0,0)
  1202.         DrawText(181,V1s,"PiXCL Tools 5.1 costs cad$173 / us$118")
  1203.         UseFont("Arial",15,33,BOLD,NOITALIC,NOUNDERLINE,255,255,255)
  1204.         DrawText(180,V1,"PiXCL Tools 5.1 costs cad$173 / us$118")
  1205.         DrawText(200,V2,"You can download from our ftp site.")
  1206.         DrawText(200,V3,"Canadian residents add 7% GST")
  1207.  
  1208.     Endif
  1209.  
  1210.  
  1211.     If XGA$ = "Y" 
  1212.         DrawTextExt(15,Y1,850,320,
  1213. "This program has showed you some of the possibilities of
  1214. the PiXCL language. PiXCL comes with lots of sample
  1215. code, and we offer free technical support to users via Internet
  1216. email.  A CD-ROM and printed PiXCL User's Manual is an available 
  1217. option. Development of PiXCL is on-going, and updates are 
  1218. available to licensed users from our Web server pages.",LEFT)
  1219.     
  1220.         DrawTextExt(15,300,800,530,
  1221. "Order PiXCL Tools today, by contacting us at
  1222. 91 rue Bocage, Suite B, Gatineau, Quebec, CANADA, J8T 5W5
  1223. Ph  (819) 246-7792  Fx (819) 568-6859  email   sales@vysor.com
  1224. Internet   http://www.vysor.com",LEFT)
  1225.  
  1226.         V1 = 400
  1227.         SetColorPalette(BITMAP)
  1228.         {DrawBitMap(15,V1,ImageFile4$)
  1229.         FreeBitMap(ImageFile4$) }
  1230.         V1 = V1 + 85  V1s = V1 + 1
  1231.         V2 = V1 + Inc  V2s = V2 + 1  V2 = V2 + Inc
  1232.         V3 = V2 + 20
  1233.         UseFont("Arial",17,35,BOLD,NOITALIC,NOUNDERLINE,0,0,0)
  1234.         DrawText(201,V1s,"PiXCL Tools 5.1 costs cad$173 / us$118")
  1235.         UseFont("Arial",17,35,BOLD,NOITALIC,NOUNDERLINE,255,255,255)
  1236.         DrawText(200,V1,"PiXCL Tools 5.1 costs cad$173 / us$118")
  1237.         UseFont("Arial",9,15,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
  1238.         DrawText(200,V2,"Download from our ftp server.")
  1239.         V4 = V3 + 60
  1240.         DrawTextExt(200,V3,650,V4,
  1241. "Canadian residents add 7% GST. Quebec residents add 6.5% QST/TVQ.",CENTER)
  1242.  
  1243.     Endif
  1244.  
  1245.  
  1246.  
  1247.     DrawBitMap(15,V1,ImageFile5$)
  1248.     FreeBitMap(ImageFile5$)
  1249.     V1 = V1 - 60
  1250.     V2 = V1 + 30
  1251.     UseFont("Arial",9,19,NOBOLD,NOITALIC,NOUNDERLINE,255,255,0)
  1252.     Button(150,V1,500,V2,PUSH,"Final Information",Back_To_Main,
  1253.           530,V1,880,V2,PUSH,"Open http://www.vysor.com",WebRegister)
  1254.  
  1255.     WaitInput()
  1256.  
  1257.  
  1258. Back_To_Main:
  1259.     Button()
  1260.     WaitInput(200)
  1261.     UseBackground(TRANSPARENT,0,0,0)
  1262.     DrawBackground
  1263.  
  1264.     UseCursor(WAIT)
  1265.     GoSub    Draw_Blue_Shade
  1266.     UseCursor(ARROW)
  1267.     UseFont("Arial",13,25,NOBOLD,NOITALIC,NOUNDERLINE,224,224,224)
  1268.     DrawTextExt(80,60,760,370,
  1269. "This ends the PiXCL Tools demonstration. It has
  1270. covered many but not all of the PiXCL functions.
  1271.  
  1272. Please see the menu options above. 
  1273.  
  1274. The PiXCL 4.4 / 5.1 Command Reference Help file is 
  1275. available for you to browse though for more 
  1276. detailed information on PiXCL, plus code 
  1277. samples that can be editted with the PiXCL 
  1278. MDI Editor, and tested with the Free 
  1279. PiXCL44.exe supplied.",LEFT)
  1280.  
  1281.  
  1282.     UseFont("Arial",9,19,NOBOLD,NOITALIC,NOUNDERLINE,255,255,0)
  1283.     Button(200,600,570,650,PUSH,"Open http://www.vysor.com",WebRegister)
  1284.  
  1285.  
  1286.     Goto Wait_for_input
  1287.  
  1288. WebRegister:
  1289.     Button()
  1290.     FindExecutable("vysorweb.htm","",WebBrowser$,Res)
  1291.     WebBrowser$ = WebBrowser$ + " http://www.vysor.com\welcome.htm"
  1292.     Run(WebBrowser$)
  1293.     Goto Wait_for_input
  1294.  
  1295.  
  1296.  
  1297.  
  1298. {======================================================================}
  1299. { Subroutine UNIX_GUI  display a user interface }
  1300. UNIX_GUI:
  1301.     UseBackground(TRANSPARENT,160,160,160)
  1302.     UseFont("Arial",9,0,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
  1303.     DrawBackground
  1304.  
  1305.  
  1306. { Set up the Info Box drawing parameters. Subroutines DarkPen and
  1307.   LightPen are available for 3D type borders }
  1308.  
  1309. { create the Project Information Box }
  1310.     Gosub DarkPen
  1311.     DrawLine(20,20,620,20) {x}
  1312.     DrawLine(20,20,20,280) {y}
  1313.     Gosub LightPen
  1314.     DrawLine(620,20,620,280) {x}
  1315.     DrawLine(20,280,620,280) {y}
  1316.  
  1317.     { create the info boxes, darker }
  1318.     UseBrush(SOLID,127,127,127)
  1319.     DrawRectangle(210,90,600,130)
  1320.     DrawRectangle(210,140,600,180)
  1321.     DrawRectangle(210,190,600,230)
  1322.     
  1323. { create the Program Status Information Box }
  1324.  
  1325.     Gosub DarkPen
  1326.     DrawLine(20,300,290,300) {x}
  1327.     DrawLine(20,300,20,580)  {y}
  1328.     Gosub LightPen
  1329.     DrawLine(290,300,290,580) {x}
  1330.     DrawLine(20,580,290,580)  {y}
  1331.  
  1332. { create the Legend Box }
  1333.  
  1334.     Gosub DarkPen
  1335.     DrawLine(310,300,620,300) {x}
  1336.     DrawLine(310,300,310,460) {y}
  1337.     Gosub LightPen
  1338.     DrawLine(620,300,620,460) {x}
  1339.     DrawLine(310,460,620,460)  {y}
  1340.  
  1341. { create the Process Sequence Box }
  1342.  
  1343.     Gosub DarkPen
  1344.     DrawLine(640,20,1000,20) {x}
  1345.     DrawLine(640,20,640,460) {y}
  1346.     Gosub LightPen
  1347.     DrawLine(1000,20,1000,460) {x}
  1348.     DrawLine(640,460,1000,460)  {y}
  1349.  
  1350. { create the output region Box with scroll bars}
  1351.  
  1352.     Gosub DarkPen
  1353.     DrawLine(310,480,980,480) {x}
  1354.     DrawLine(310,480,310,570) {y}
  1355.     Gosub LightPen
  1356.     DrawLine(980,480,980,570) {x}
  1357.     DrawLine(310,570,980,570)  {y}
  1358.  
  1359.     UseBrush(SOLID,127,127,127)
  1360.     DrawRectangle(311,481,979,569)
  1361.  
  1362.     { scroll bar simulation }    {X-axis}
  1363.     Gosub DarkPen
  1364.     DrawLine(310,580,980,580) {x}
  1365.     DrawLine(310,580,310,590) {y}
  1366.     Gosub LightPen
  1367.     DrawLine(980,580,980,590) {x}
  1368.     DrawLine(310,590,980,590) {y}
  1369.  
  1370.     Gosub DarkPen    {Y-axis}
  1371.     DrawLine(990,480,1000,480) {x}
  1372.     DrawLine(990,480,990,570) {y}
  1373.     Gosub LightPen    
  1374.     DrawLine(1000,480,1000,570) {x}
  1375.     DrawLine(990,570,1000,570)  {y}
  1376.  
  1377.     
  1378.  
  1379. { create the Session History Box }
  1380.  
  1381.     Gosub DarkPen
  1382.     DrawLine(20,620,1000,620) {x}
  1383.     DrawLine(20,620,20,720) {y}
  1384.     Gosub LightPen
  1385.     DrawLine(1000,620,1000,720) {x}
  1386.  
  1387.  
  1388. { create ALL the 3D buttons. Some are ignore functions }
  1389.     WaitInput(100)
  1390.     Button( 220,40,410,70,PUSH,"About PiXCL Tools",About_Box,
  1391.             710,40,930,70,PUSH,"Typical Uses",Wait_for_Input,
  1392.             55,310,255,340,PUSH,"Continue",Quit_GUI,
  1393.              55,540,255,570,PUSH,"Continue",Quit_GUI,
  1394.             385,310,565,340,PUSH,"Databank",Wait_for_Input,
  1395.         810,630,990,660,PUSH,"Session Status",Wait_for_Input,
  1396.         
  1397.         700, 90,720,110,PUSH,"",Wait_for_Input,
  1398.         700,130,720,150,PUSH,"",Wait_for_Input,
  1399.         700,170,720,190,PUSH,"",Wait_for_Input,
  1400.         700,210,720,230,PUSH,"",Wait_for_Input,
  1401.         700,250,720,270,PUSH,"",Wait_for_Input,
  1402.         700,290,720,310,PUSH,"",Wait_for_Input,
  1403.         700,330,720,350,PUSH,"",Wait_for_Input,
  1404.         700,370,720,390,PUSH,"",Wait_for_Input,
  1405.  
  1406.     { legend buttons }
  1407.         325,355,345,375,PUSH,"",Wait_for_Input,
  1408.         325,390,345,410,PUSH,"",Wait_for_Input,
  1409.         325,425,345,445,PUSH,"",Wait_for_Input)
  1410.         
  1411.  
  1412. { create all the shadowed text against the buttons and elsewhere}
  1413.  
  1414.     Gosub Shadow_11_17
  1415.     DrawText(51,112,"Name:")
  1416.     DrawText(51,162,"Area:")
  1417.     DrawText(51,212,"Default:")
  1418.     Gosub Cream_11_17
  1419.     DrawText(50,110,"Name:")
  1420.     DrawText(50,160,"Area:")
  1421.     DrawText(50,210,"Default:")
  1422.  
  1423.     Gosub Shadow_11_17
  1424.     DrawText(51,352,"Currently Executing")
  1425.     DrawText(91,372 ,"Task:")
  1426.     DrawText(51,492,"Network Node:")
  1427.     Gosub Cream_11_17
  1428.     DrawText(50,350,"Currently Executing")
  1429.     DrawText(90,370,"Task:")
  1430.     DrawText(50,490,"Network Node:")
  1431.  
  1432.     Gosub Shadow_11_17
  1433.     DrawText(731, 92,"Hi-Tech companies")
  1434.     DrawText(731,132,"Professional Groups")
  1435.     DrawText(731,172,"Technical Services")
  1436.     DrawText(731,212,"Sales & Marketing")
  1437.     DrawText(731,252,"Real Estate")
  1438.     DrawText(731,292,"Manufacturing")
  1439.     DrawText(731,332,"On-Line Brochures")
  1440.     DrawText(731,372,"On-Line Manuals")
  1441.  
  1442.     Gosub Cream_11_17
  1443.     DrawText(730,90,"Hi-Tech companies")
  1444.     DrawText(730,130,"Professional Groups")
  1445.     DrawText(730,170,"Technical Services")
  1446.     DrawText(730,210,"Sales & Marketing")
  1447.     DrawText(730,250,"Real Estate")
  1448.     DrawText(730,290,"Manufacturing")
  1449.     DrawText(730,330,"On-Line Brochures")
  1450.     DrawText(730,370,"On-Line Manuals")
  1451.  
  1452.     Gosub Shadow_11_17
  1453.     DrawText(351,357,"Start new Process")
  1454.     DrawText(351,392,"Progress Status")
  1455.     DrawText(351,427,"Process completed")
  1456.     Gosub Cream_11_17
  1457.     DrawText(350,355,"Start new Process")
  1458.     DrawText(350,390,"Progress Status")
  1459.     DrawText(350,425,"Process completed")
  1460.  
  1461.     UseFont("Arial",15,33,NOBOLD,ITALIC,NOUNDERLINE,127,255,0)
  1462.     DrawText(350,484,"Try these 3D buttons on the screen")    
  1463.     UseFont("Arial",15,33,NOBOLD,ITALIC,NOUNDERLINE,255,224,0)
  1464.     DrawText(260,530,"<------ Press this button to continue")    
  1465.     Return
  1466.  
  1467. {======================================================================}
  1468. {====================== Utility Subroutines ===============================}
  1469. {======================================================================}
  1470.  
  1471. { Subroutine Draw_Blue_Shade: create a shaded background, black at top }
  1472. Draw_Blue_Shade:
  1473.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  1474.     {DrawShadeRectangle(cx1,cy1,cx2,cy2,0,0,0,0,0,224,TOPBOTTOM)}
  1475.     GradientFillRect(cx1,cy1,cx2,cy2, VERT, 0,0,0, 0,0,224)
  1476.     Return
  1477. {======================================================================}
  1478. { Subroutine Draw_Green_Shade: create a shaded background, black at top }
  1479. Draw_Green_Shade:
  1480.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  1481.     {DrawShadeRectangle(cx1,cy1,cx2,cy2, 0,0,0, 0,192,0,TOPBOTTOM)}
  1482.     GradientFillRect(cx1,cy1,cx2,cy2, VERT, 0,0,0, 0,192,0)
  1483.     Return
  1484. {======================================================================}
  1485. { Subroutine Draw_Red_Shade: create a shaded background, black at top }
  1486. Draw_Red_Shade:
  1487.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  1488.     {DrawShadeRectangle(cx1,cy1,cx2,cy2, 0,0,0, 192,0,0,TOPBOTTOM)}
  1489.     GradientFillRect(cx1,cy1,cx2,cy2, VERT, 0,0,0, 192,0,0)
  1490.     Return
  1491. {======================================================================}
  1492. { Subroutine Draw_Orange_Shade: create a shaded background, black at top }
  1493. Draw_Orange_Shade:
  1494.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  1495.     {DrawShadeRectangle(cx1,cy1,cx2,cy2, 0,0,0, 255,160,0,TOPBOTTOM)}
  1496.     GradientFillRect(cx1,cy1,cx2,cy2, VERT, 0,0,0, 255,160,0)
  1497.     Return
  1498. {======================================================================}
  1499. { Subroutine Draw_Magenta_Shade: create a shaded background, black at top }
  1500. Draw_Magenta_Shade:
  1501.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  1502.     {DrawShadeRectangle(cx1,cy1,cx2,cy2, 0,0,0, 255,0,255,TOPBOTTOM)}
  1503.     GradientFillRect(cx1,cy1,cx2,cy2, VERT, 0,0,0, 255,0,255)
  1504.     Return
  1505.  
  1506. DarkPen:
  1507.     UsePen(SOLID,2,127,127,127)
  1508.     Return
  1509.  
  1510. LightPen:
  1511.     UsePen(SOLID,2,192,192,192)
  1512.     Return
  1513.  
  1514. Shadow_11_17:
  1515.     UseFont("Arial",11,17,BOLD,NOITALIC,NOUNDERLINE,0,0,0)
  1516.     Return
  1517. Cream_11_17:
  1518.     UseFont("Arial",11,17,BOLD,NOITALIC,NOUNDERLINE,250,250,250)
  1519.     Return
  1520. {==================================================================}
  1521. Ask_Status: {subroutine}
  1522.     UseFont("Arial",17,29,NOBOLD,ITALIC,NOUNDERLINE,255,255,255)
  1523.     DrawText(10,10,"Would you describe yourself as a ...")
  1524.     UseFont("Arial",15,27,NOBOLD,NOITALIC,NOUNDERLINE,0,255,255)
  1525.     DrawText(40,50,"Computer professional")
  1526.     DrawText(40,80,"Small business owner")
  1527.     DrawText(40,110,"Windows programmer")
  1528.     DrawText(40,140,"Teacher or educator")
  1529.     DrawText(40,170,"School or University student")
  1530.     DrawText(40,200,"Home computer user")
  1531.  
  1532.     DrawFrameControl(10, 50,34, 74,BUTTONRADIO, INACTIVE,Res)
  1533.     DrawFrameControl(10, 80,34,104,BUTTONRADIO, INACTIVE,Res)
  1534.     DrawFrameControl(10,110,34,134,BUTTONRADIO, INACTIVE,Res)
  1535.     DrawFrameControl(10,140,34,164,BUTTONRADIO, INACTIVE,Res)
  1536.     DrawFrameControl(10,170,34,194,BUTTONRADIO, INACTIVE,Res)
  1537.     DrawFrameControl(10,200,34,224,BUTTONRADIO, INACTIVE,Res)
  1538.  
  1539.     SetMouse(10, 50,400, 74,Ask_Status_1,X,Y,
  1540.            10, 80,400,104,Ask_Status_2,X,Y,
  1541.            10,110,400,134,Ask_Status_3,X,Y,
  1542.            10,140,400,164,Ask_Status_4,X,Y,
  1543.            10,170,400,194,Ask_Status_5,X,Y,
  1544.            10,200,400,224,Ask_Status_6,X,Y)
  1545.  
  1546.     Return
  1547.  
  1548.  
  1549.  
  1550. Define_Interest:
  1551.     UseFont("Arial",17,29,NOBOLD,ITALIC,NOUNDERLINE,255,255,255)
  1552.     DrawText(10,250,"Is your primary interest ...")
  1553.     UseFont("Arial",15,27,NOBOLD,NOITALIC,NOUNDERLINE,0,255,255)
  1554.     DrawText(40,300,"Presentation graphics")
  1555.     DrawText(40,330,"Image display and processing")
  1556.     DrawText(40,360,"Training course development")
  1557.     DrawText(40,390,"System management utilities")
  1558.     DrawText(40,420,"Multimedia graphics")
  1559.     DrawText(40,450,"Self education tools")
  1560.  
  1561.     DrawFrameControl(10,300,34,324,BUTTONRADIO, INACTIVE,Res)
  1562.     DrawFrameControl(10,330,34,354,BUTTONRADIO, INACTIVE,Res)
  1563.     DrawFrameControl(10,360,34,384,BUTTONRADIO, INACTIVE,Res)
  1564.     DrawFrameControl(10,390,34,414,BUTTONRADIO, INACTIVE,Res)
  1565.     DrawFrameControl(10,420,34,444,BUTTONRADIO, INACTIVE,Res)
  1566.     DrawFrameControl(10,450,34,474,BUTTONRADIO, INACTIVE,Res)
  1567.  
  1568.     SetMouse(10,300,400,324,Int_Status_1,X,Y,
  1569.            10,330,400,354,Int_Status_2,X,Y,
  1570.            10,360,400,384,Int_Status_3,X,Y,
  1571.            10,390,400,414,Int_Status_4,X,Y,
  1572.            10,420,400,444,Int_Status_5,X,Y,
  1573.            10,450,400,474,Int_Status_6,X,Y)
  1574.     Return
  1575.  
  1576.  
  1577. DrawPrice:
  1578.     WaitInput(1200)
  1579.      If XGA$ = "Y"
  1580.         px1 = cx2 - 260 py1 = 30
  1581.     Else
  1582.         px1 = cx2 -240 py1 = 30
  1583.     Endif
  1584.  
  1585.         UseFont("Arial",23,73,BOLD,NOITALIC,NOUNDERLINE,255,255,0)
  1586.     DrawText(px1,py1,"us$118")
  1587.  
  1588.     px2 = px1 + 64    px3 = px1 + 80 px4 = px3 + 64
  1589.     DrawSizedBitmap(px3,100,px4,141,ImageFile5$)
  1590.  
  1591.        UseFont("Arial",7,19,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
  1592.     DrawText(px1,10,"PiXCL Tools 5.1 costs")
  1593.     DrawText(px1,145,"Cdn$173, GST extra")
  1594.  
  1595.         UseFont("Arial",17,29,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
  1596.     Return
  1597.  
  1598.